import 'package:flutterproject/generated/json/base/json_field.dart';
import 'package:flutterproject/generated/json/child_account_list_bean.g.dart';
import 'dart:convert';

@JsonSerializable()
class ChildAccountListBean {

	String? mainAccount;
	List<ChildAccountListSubAccounts>? subAccounts;
	int? subType;
  
  ChildAccountListBean();

  factory ChildAccountListBean.fromJson(Map<String, dynamic> json) => $ChildAccountListBeanFromJson(json);

  Map<String, dynamic> toJson() => $ChildAccountListBeanToJson(this);

  ChildAccountListBean copyWith({String? mainAccount, List<ChildAccountListSubAccounts>? subAccounts, int? subType}) {
      return ChildAccountListBean()..mainAccount= mainAccount ?? this.mainAccount
			..subAccounts= subAccounts ?? this.subAccounts
			..subType= subType ?? this.subType;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class ChildAccountListSubAccounts {

	String? mobile;
  
  ChildAccountListSubAccounts();

  factory ChildAccountListSubAccounts.fromJson(Map<String, dynamic> json) => $ChildAccountListSubAccountsFromJson(json);

  Map<String, dynamic> toJson() => $ChildAccountListSubAccountsToJson(this);

  ChildAccountListSubAccounts copyWith({String? mobile}) {
      return ChildAccountListSubAccounts()..mobile= mobile ?? this.mobile;
  }
    
  @override
  String toString() {
    return jsonEncode(this);
  }
}